<template>
  <div class="person">
    <h2>当前求和为：{{ sum }}</h2>
    <h2>当前求和的10倍为：{{ bigSum }}</h2>
    <button @click="add">点我+1</button>
    <hr>
    <img v-for="item in dogList" :key="item.id" :src="item.url" alt="">
    <br>
    <button @click="getDogList">获取狗狗</button>
  </div>
</template>
<script setup lang="ts">
import { onMounted } from 'vue';
import useSum from '@/hooks/useSum'
import useDog from '@/hooks/useDog'

const {sum,add,bigSum} = useSum()
const {dogList,getDogList} = useDog()

onMounted(()=>{
  console.log('Person挂载完成')
})
</script>
<style scoped>
.person {
  background-color: #e7abab;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}

button {
  margin: 0 5px;
}
</style>